{{--@dd($errors)--}}
@if($errors->count()>0)
    @foreach($errors->all() as $error)
        {{--如果有错误就通过foreach循环输出错误的内容--}}
        <div class="alert alert-warning" role="alert">
            <strong>{{$error}}</strong>
        </div>
    @endforeach
    @endif
{{--如果session()中有'success'就获取并输出'success'中的值--}}
@if(session()->has('success'))
    <div class="alert alert-success" role="alert">
        <strong>{{session()->get('success')}}</strong>
    </div>
@endif

<script>
    require(['hdjs'], function (hdjs) {
        hdjs.swal({
            text: "保存成功",
            button:false,
            icon:'warning'
        });
    })
</script>



{{--如果session()中有'error'就获取并输出'error'中的值--}}
@if(session()->has('error'))
    <div class="alert alert-success" role="alert">
        <strong>{{session()->get('error')}}</strong>
    </div>
@endif
